#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import careinfo_blueprint
from api_1_0.careInfoResource.careInfoResource import CareInfoResource
from api_1_0.careInfoResource.careInfoOtherResource import CareInfoOtherResource

api = Api(careinfo_blueprint)

api.add_resource(CareInfoResource, '/careInfo/<UserID>', '/careInfo', endpoint='careInfo')


# joint query
@careinfo_blueprint.route('/careInfo/query', methods=['GET'], endpoint='careInfo_query')
def CareInfo_query():
    return CareInfoOtherResource.joint_query()

# joint query
@careinfo_blueprint.route('/careInfo/addcare', methods=['POST'], endpoint='careInfo_addcare')
def CareInfo_addcare():
    return CareInfoOtherResource.addcare()


#  获取动态
@careinfo_blueprint.route('/careInfo/getcare', methods=['GET'], endpoint='careInfo_getcare')
def CareInfo_getcare():
    return CareInfoOtherResource.getcare()

# 获取关注人列表
@careinfo_blueprint.route('/careInfo/getcarelist', methods=['GET'], endpoint='careInfo_getcarelist')
def CareInfo_getcarelist():
    return CareInfoOtherResource.getcarelist()

# 获取单个关注人动态
@careinfo_blueprint.route('/careInfo/getsinglecare', methods=['GET'], endpoint='careInfo_getsinglecare')
def CareInfo_getsinglecare():
    return CareInfoOtherResource.getsinglecare()